package com.mall.common.bean;

import javax.xml.bind.annotation.XmlRootElement;

import com.mall.common.domain.content.AdvertDomain;
import com.mall.common.util.UploadUtil;

@XmlRootElement
public class AdvertBean {
	private Long id;
	private String name; // 广告名字
	private Integer clickNumber;// 点击数
	private String url;// 广告链接
	private String logo;// 上传文件
	private Integer priority;
	private String background;// 背景图

	public AdvertBean() {
	}
	
	public AdvertBean(AdvertDomain advert) {
		this.id = advert.getId();
		this.name = advert.getName();
		this.clickNumber = advert.getClickNumber();
		this.url = advert.getUrl();
		this.logo = UploadUtil.replacePath(advert.getLogo());
		this.priority = advert.getPriority();
		this.background = UploadUtil.replacePath(advert.getBackground());
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getClickNumber() {
		return clickNumber;
	}

	public void setClickNumber(Integer clickNumber) {
		this.clickNumber = clickNumber;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public String getBackground() {
		return background;
	}

	public void setBackground(String background) {
		this.background = background;
	}

}
